<template>
    <div>
        <div id="main" style="width: 600px;height:400px;"></div>
    </div>
</template>

<script>
import * as echarts from 'echarts';
import { getReports } from '@/api/orders'
export default {
    data() {
        return {

        };
    },
    computed: {

    },
    created() {
        this.getReportsFn()
    },
    mounted() {

    },
    watch: {
            
    },
    methods: {
        async getReportsFn() {
            let res = await getReports()
            console.log(res);
            var chartDom = document.getElementById('main');
            var myChart = echarts.init(chartDom);
            var option = res.data;

            option && myChart.setOption(option);
        }
    },
    components: {

    },
};
</script>

<style scoped>
</style>
